package com.web.cms.pan.message;

import com.blue.core.dict.State;
import com.blue.validation.group.DeleteModel;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 目录请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2018年04月09日
 */
 public class FolderRequest implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = { UpdateModel.class, DeleteModel.class}, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id; // 编号
	private Integer parentId; // 上级编号
	@NotNull(groups = { SaveModel.class, UpdateModel.class, DeleteModel.class }, message = "用户编号不能为空")
	private Integer userId; // 用户编号
	@NotBlank(groups = { SaveModel.class }, message = "目录名称不能为空")
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "目录名称长度[0-200]")
	private String name; // 目录名称
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "图标长度[0-50]")
	private String icon; // 图标
	private Date createTime; // 创建时间
	private Date deleteTime; // 删除时间
	private Integer files; // 文件数
	private Long fileSize; // 文件大小
	@NotNull(groups = {DeleteModel.class}, message = "目录状态不能为空")
	private State state; // 状态：0正常，1作废
	
	public FolderRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public Integer getParentId()
	{
		return this.parentId;
	}
	
	public void setParentId(Integer parentId)
	{
		this.parentId = parentId;
	}
	
	public Integer getUserId()
	{
		return this.userId;
	}
	
	public void setUserId(Integer userId)
	{
		this.userId = userId;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getIcon()
	{
		return this.icon;
	}
	
	public void setIcon(String icon)
	{
		this.icon = icon;
	}
	
	public Date getCreateTime()
	{
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}
	
	public Date getDeleteTime()
	{
		return this.deleteTime;
	}
	
	public void setDeleteTime(Date deleteTime)
	{
		this.deleteTime = deleteTime;
	}
	
	public Integer getFiles()
	{
		return this.files;
	}
	
	public void setFiles(Integer files)
	{
		this.files = files;
	}
	
	public Long getFileSize()
	{
		return this.fileSize;
	}
	
	public void setFileSize(Long fileSize)
	{
		this.fileSize = fileSize;
	}
	
	public State getState()
	{
		return this.state;
	}
	
	public void setState(State state)
	{
		this.state = state;
	}
	
}
